package com.itheima.spring;

import com.alibaba.druid.pool.DruidDataSource;
import com.itheima.spring.Dao.BookDao;
import com.itheima.spring.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class iocDemo {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        DruidDataSource druidDataSource=  (DruidDataSource) context.getBean("druidDataSource");
        System.out.println(druidDataSource);
        context.close();

    }
}
